package com.yugao.fintech.antelope.infra.job.task;

import com.yugao.fintech.antelope.infra.job.service.IJobLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;


@Slf4j
@Component
public class DeleteLogTask implements ITask {
    @Autowired
    private IJobLogService jobLogService;

    /**
     * 删除多少天之前的日志
     * @param beforeDays 必须为负数
     */
    public void exec(Integer beforeDays) {
        log.info("exec task, beforeDays: " + beforeDays);
//        OperLogDeleteDTO operLogDeleteDTO = new OperLogDeleteDTO();
//        operLogDeleteDTO.setBeforeDays(beforeDays);
//        Response response = sysJobLogService.deleteOperLog(operLogDeleteDTO);
//        if (response.isSuccess()) {
//            log.info("批量删除日志成功: [{}]",response.getMessage());
//        } else {
//            log.error("批量删除日志失败: [{}]",response.getMessage());
//        }
    }
}
